<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Enrich your data | ElasticSearch 7.7 权威指南中文版</title>
	<meta name="keywords" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <meta name="description" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
	<link rel="stylesheet" type="text/css" href="../static/styles.css" />
	<script>
	var _link = 'ingest-enriching-data.html';
    </script>
</head>
<body>
<div class="main-container">
    <section id="content">
        <div class="content-wrapper">
            <section id="guide" lang="zh_cn">
                <div class="container">
                    <div class="row">
                        <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                            <div style="color:gray; word-break: break-all; font-size:12px;">原英文版地址: <a href="https://www.elastic.co/guide/en/elasticsearch/reference/7.7/ingest-enriching-data.html" rel="nofollow" target="_blank">https://www.elastic.co/guide/en/elasticsearch/reference/7.7/ingest-enriching-data.html</a>, 原文档版权归 www.elastic.co 所有<br/>本地英文版地址: <a href="../en/ingest-enriching-data.html" rel="nofollow" target="_blank">../en/ingest-enriching-data.html</a></div>
                        <!-- start body -->
                  <div class="page_header">
<strong>重要</strong>: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html" rel="nofollow">当前版本文档</a>。
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch Guide [7.7]</a></span>
»
<span class="breadcrumb-link"><a href="ingest.html">Ingest node</a></span>
»
<span class="breadcrumb-node">Enrich your data</span>
</div>
<div class="navheader">
<span class="prev">
<a href="handling-failure-in-pipelines.html">« Handling Failures in Pipelines</a>
</span>
<span class="next">
<a href="enrich-setup.html">Set up an enrich processor »</a>
</span>
</div>
<div class="chapter xpack">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="ingest-enriching-data"></a>Enrich your data<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/ingest/enrich.asciidoc">edit</a><a class="xpack_tag" href="https://www.elastic.co/subscriptions"></a>
</h2>
</div></div></div>
<p>You can use the <a class="xref" href="enrich-processor.html" title="Enrich Processor">enrich processor</a> to add data from your
existing indices to incoming documents during ingest.</p>
<p>For example, you can use the enrich processor to:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
Identify web services or vendors based on known IP addresses
</li>
<li class="listitem">
Add product information to retail orders based on product IDs
</li>
<li class="listitem">
Supplement contact information based on an email address
</li>
<li class="listitem">
Add postal codes based on user coordinates
</li>
</ul>
</div>
<h3>
<a id="how-enrich-works"></a>How the enrich processor works<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/ingest/enrich.asciidoc">edit</a>
</h3>
<p>An <a class="xref" href="ingest.html" title="Ingest node">ingest pipeline</a> changes documents before they are actually
indexed. You can think of an ingest pipeline as an assembly line made up of a
series of workers, called <a class="xref" href="ingest-processors.html" title="Processors">processors</a>. Each processor makes
specific changes, like lowercasing field values, to incoming documents before
moving on to the next. When all the processors in a pipeline are done, the
finished document is added to the target index.</p>
<div class="imageblock text-center">
<div class="content">
<img src="../static/images/ingest/ingest-process.svg" alt="ingest process">
</div>
</div>
<p>Most processors are self-contained and only change <em>existing</em> data in incoming
documents. But the enrich processor adds <em>new</em> data to incoming documents
and requires a few special components:</p>
<div class="imageblock text-center">
<div class="content">
<img src="../static/images/ingest/enrich/enrich-process.svg" alt="enrich process">
</div>
</div>
<div class="variablelist">
<a id="enrich-policy"></a>
<dl class="variablelist">
<dt>
<span class="term">
enrich policy
</span>
</dt>
<dd>
<p>A set of configuration options used to add the right enrich data to the right
incoming documents.</p>
<p>An enrich policy contains:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
A list of one or more <em>source indices</em> which store enrich data as documents
</li>
<li class="listitem">
The <em>policy type</em> which determines how the processor matches the enrich data
to incoming documents
</li>
<li class="listitem">
A <em>match field</em> from the source indices used to match incoming documents
</li>
<li class="listitem">
<em>Enrich fields</em> containing enrich data from the source indices you want to add
to incoming documents
</li>
</ul>
</div>
<p>Before it can be used with an enrich processor, an enrich policy must be
<a class="xref" href="execute-enrich-policy-api.html" title="Execute enrich policy API">executed</a>. When executed, an enrich policy uses
enrich data from the policy’s source indices to create a streamlined system
index called the <em>enrich index</em>. The processor uses this index to match and
enrich incoming documents.</p>
<p>See <a class="xref" href="enrich-policy-definition.html" title="Enrich policy definition">Enrich policy definition</a> for a full list of enrich policy types and
configuration options.</p>
</dd>
</dl>
</div>
<div class="variablelist">
<a id="source-index"></a>
<dl class="variablelist">
<dt>
<span class="term">
source index
</span>
</dt>
<dd>
An index which stores enrich data you’d like to add to incoming documents. You
can create and manage these indices just like a regular Elasticsearch index. You can use
multiple source indices in an enrich policy. You also can use the same source
index in multiple enrich policies.
</dd>
</dl>
</div>
<div class="variablelist">
<a id="enrich-index"></a>
<dl class="variablelist">
<dt>
<span class="term">
enrich index
</span>
</dt>
<dd>
<p>A special system index tied to a specific enrich policy.</p>
<p>Directly matching incoming documents to documents in source indices could be
slow and resource intensive. To speed things up, the enrich processor uses an
enrich index.</p>
<p>Enrich indices contain enrich data from source indices but have a few special
properties to help streamline them:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
They are system indices, meaning they’re managed internally by Elasticsearch and only
intended for use with enrich processors.
</li>
<li class="listitem">
They always begin with <code class="literal">.enrich-*</code>.
</li>
<li class="listitem">
They are read-only, meaning you can’t directly change them.
</li>
<li class="listitem">
They are <a class="xref" href="indices-forcemerge.html" title="Force merge API">force merged</a> for fast retrieval.
</li>
</ul>
</div>
</dd>
</dl>
</div>




</div>
<div class="navfooter">
<span class="prev">
<a href="handling-failure-in-pipelines.html">« Handling Failures in Pipelines</a>
</span>
<span class="next">
<a href="enrich-setup.html">Set up an enrich processor »</a>
</span>
</div>
</div>

                  <!-- end body -->
                        </div>
                        <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                        
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </section>
</div>
<script src="../static/cn.js"></script>
</body>
</html>